package lab01;

public class Test12 {
    public static void main(String[] args) {
        int j = 0;
        for (int i = 102;i < 1000;i++ ) {
            int a,b,c;
            a = i / 100;
            b = (i % 100)/10;
            c = i % 10;
            if (i == a*a*a + b*b*b +c*c*c) {
                j++;
                System.out.println("第" + j + "个水仙花数为：" + i);
            }
        }
        System.out.println("水仙花数数量为：" + j);
    }
}
